﻿namespace HRM.CORE.Workdesk
{
    using DevExpress.XtraEditors;
    using DevExpress.XtraEditors.Controls;
    using DevExpress.XtraTab;
    using APP.HELPER;
    using HRM.CORE.Workdesk.Chart;
    using System; using Extra.ERP;
    using System.ComponentModel;
    using System.Drawing;
    using System.Windows.Forms; using Common;
    using Common;

    public class xucChart : Common.xucBase
    {
        private IContainer components = null;
        private GroupControl groupControl1;
        private XtraTabPage tabChartAge;
        private XtraTabPage tabChartEducation;
        private XtraTabPage tabChartEthnic;
        private XtraTabPage tabChartInformatic;
        private XtraTabPage tabChartLanguage;
        private XtraTabPage tabChartMarriage;
        private XtraTabPage tabChartNationality;
        private XtraTabPage tabChartPosition;
        private XtraTabPage tabChartProfessional;
        private XtraTabPage tabChartRate;
        private XtraTabPage tabChartReligion;
        private XtraTabPage tabChartSex;
        private XtraTabPage tabChartStatus;
        private XtraTabControl xtraTabControl1;
        private HRM.CORE.Workdesk.Chart.xucChartAge xucChartAge;
        private HRM.CORE.Workdesk.Chart.xucChartEducation xucChartEducation;
        private HRM.CORE.Workdesk.Chart.xucChartEthnic xucChartEthnic;
        private HRM.CORE.Workdesk.Chart.xucChartInformatic xucChartInformatic;
        private HRM.CORE.Workdesk.Chart.xucChartLanguage xucChartLanguage;
        private HRM.CORE.Workdesk.Chart.xucChartMarriage xucChartMarriage;
        private HRM.CORE.Workdesk.Chart.xucChartNationality xucChartNationality;
        private HRM.CORE.Workdesk.Chart.xucChartPosition xucChartPosition;
        private HRM.CORE.Workdesk.Chart.xucChartProfessional xucChartProfessional;
        private HRM.CORE.Workdesk.Chart.xucChartRate xucChartRate;
        private HRM.CORE.Workdesk.Chart.xucChartReligion xucChartReligion;
        private HRM.CORE.Workdesk.Chart.xucChartSex xucChartSex;
        private HRM.CORE.Workdesk.Chart.xucChartStatus xucChartStatus;

        public xucChart()
        {
            this.InitializeComponent();
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            this.xtraTabControl1 = new XtraTabControl();
            this.tabChartSex = new XtraTabPage();
            this.tabChartAge = new XtraTabPage();
            this.tabChartRate = new XtraTabPage();
            this.tabChartPosition = new XtraTabPage();
            this.tabChartEducation = new XtraTabPage();
            this.tabChartLanguage = new XtraTabPage();
            this.tabChartInformatic = new XtraTabPage();
            this.tabChartEthnic = new XtraTabPage();
            this.tabChartReligion = new XtraTabPage();
            this.tabChartNationality = new XtraTabPage();
            this.tabChartMarriage = new XtraTabPage();
            this.tabChartStatus = new XtraTabPage();
            this.tabChartProfessional = new XtraTabPage();
            this.groupControl1 = new GroupControl();
            this.xtraTabControl1.BeginInit();
            this.xtraTabControl1.SuspendLayout();
            this.groupControl1.BeginInit();
            this.groupControl1.SuspendLayout();
            base.SuspendLayout();
            this.xtraTabControl1.BorderStyle = BorderStyles.NoBorder;
            this.xtraTabControl1.BorderStylePage = BorderStyles.NoBorder;
            this.xtraTabControl1.Dock = DockStyle.Fill;
            this.xtraTabControl1.HeaderButtons = TabButtons.Default | TabButtons.Next | TabButtons.Prev;
            this.xtraTabControl1.HeaderButtonsShowMode = TabButtonShowMode.Always;
            this.xtraTabControl1.HeaderLocation = TabHeaderLocation.Bottom;
            this.xtraTabControl1.Location = new Point(2, 0x16);
            this.xtraTabControl1.Name = "xtraTabControl1";
            this.xtraTabControl1.SelectedTabPage = this.tabChartSex;
            this.xtraTabControl1.Size = new Size(760, 0x1b2);
            this.xtraTabControl1.TabIndex = 11;
            this.xtraTabControl1.TabPages.AddRange(new XtraTabPage[] { this.tabChartSex, this.tabChartAge, this.tabChartRate, this.tabChartPosition, this.tabChartEducation, this.tabChartLanguage, this.tabChartInformatic, this.tabChartEthnic, this.tabChartReligion, this.tabChartNationality, this.tabChartMarriage, this.tabChartStatus, this.tabChartProfessional });
            this.xtraTabControl1.Selected += new TabPageEventHandler(this.xtraTabControl1_Selected);
            this.tabChartSex.Name = "tabChartSex";
            this.tabChartSex.Size = new Size(0x2f1, 0x195);
            this.tabChartSex.Text = "Theo Giới T\x00ednh";
            this.tabChartAge.Name = "tabChartAge";
            this.tabChartAge.Size = new Size(0x2f1, 0x195);
            this.tabChartAge.Text = "Theo Độ Tuổi";
            this.tabChartRate.Name = "tabChartRate";
            this.tabChartRate.Size = new Size(0x2f1, 0x195);
            this.tabChartRate.Text = "Tỷ Lệ Số Lao Động";
            this.tabChartPosition.Name = "tabChartPosition";
            this.tabChartPosition.Size = new Size(0x2f1, 0x195);
            this.tabChartPosition.Text = "Chức Danh";
            this.tabChartEducation.Name = "tabChartEducation";
            this.tabChartEducation.Size = new Size(0x2f1, 0x195);
            this.tabChartEducation.Text = "Tr\x00ecnh Độ";
            this.tabChartLanguage.Name = "tabChartLanguage";
            this.tabChartLanguage.Size = new Size(0x2f1, 0x195);
            this.tabChartLanguage.Text = "Ngoại Ngữ";
            this.tabChartInformatic.Name = "tabChartInformatic";
            this.tabChartInformatic.Size = new Size(0x2f1, 0x195);
            this.tabChartInformatic.Text = "Tin Học";
            this.tabChartEthnic.Name = "tabChartEthnic";
            this.tabChartEthnic.Size = new Size(0x2f1, 0x195);
            this.tabChartEthnic.Text = "D\x00e2n Tộc";
            this.tabChartReligion.Name = "tabChartReligion";
            this.tabChartReligion.Size = new Size(0x2f1, 0x195);
            this.tabChartReligion.Text = "T\x00f4n Gi\x00e1o";
            this.tabChartNationality.Name = "tabChartNationality";
            this.tabChartNationality.Size = new Size(0x2f1, 0x195);
            this.tabChartNationality.Text = "Quốc Tịch";
            this.tabChartMarriage.Name = "tabChartMarriage";
            this.tabChartMarriage.Size = new Size(0x2f1, 0x195);
            this.tabChartMarriage.Text = "T\x00ecnh Trạng H\x00f4n Nh\x00e2n";
            this.tabChartStatus.Name = "tabChartStatus";
            this.tabChartStatus.Size = new Size(0x2f1, 0x195);
            this.tabChartStatus.Text = "T\x00ecnh Trạng Lao Động";
            this.tabChartProfessional.Name = "tabChartProfessional";
            this.tabChartProfessional.Size = new Size(0x2f1, 0x195);
            this.tabChartProfessional.Text = "Chuy\x00ean M\x00f4n";
            this.groupControl1.Controls.Add(this.xtraTabControl1);
            this.groupControl1.Dock = DockStyle.Fill;
            this.groupControl1.Location = new Point(0, 0);
            this.groupControl1.Name = "groupControl1";
            this.groupControl1.Size = new Size(0x2fc, 0x1ca);
            this.groupControl1.TabIndex = 12;
            this.groupControl1.Text = "Biểu Đồ Thống K\x00ea";
            base.AutoScaleDimensions = new SizeF(6f, 13f);
            base.AutoScaleMode = AutoScaleMode.Font;
            base.Controls.Add(this.groupControl1);
            base.Name = "xucChart";
            base.Size = new Size(0x2fc, 0x1ca);
            this.xtraTabControl1.EndInit();
            this.xtraTabControl1.ResumeLayout(false);
            this.groupControl1.EndInit();
            this.groupControl1.ResumeLayout(false);
            base.ResumeLayout(false);
        }

        public void LoadData()
        {
            if (this.xucChartSex == null)
            {
                this.xucChartSex = new HRM.CORE.Workdesk.Chart.xucChartSex();
                this.xucChartSex.Dock = DockStyle.Fill;
                this.tabChartSex.Controls.Add(this.xucChartSex);
            }
        }

        public void SetNoBorder()
        {
            this.groupControl1.BorderStyle = BorderStyles.NoBorder;
        }

        private void xtraTabControl1_Selected(object sender, TabPageEventArgs e)
        {
            if (e.Page == this.tabChartSex)
            {
                if (this.xucChartSex == null)
                {
                    this.xucChartSex = new HRM.CORE.Workdesk.Chart.xucChartSex();
                    this.xucChartSex.Dock = DockStyle.Fill;
                    this.tabChartSex.Controls.Add(this.xucChartSex);
                }
            }
            else if (e.Page == this.tabChartAge)
            {
                if (this.xucChartAge == null)
                {
                    this.xucChartAge = new HRM.CORE.Workdesk.Chart.xucChartAge();
                    this.xucChartAge.Dock = DockStyle.Fill;
                    this.tabChartAge.Controls.Add(this.xucChartAge);
                }
            }
            else if (e.Page == this.tabChartRate)
            {
                if (this.xucChartRate == null)
                {
                    this.xucChartRate = new HRM.CORE.Workdesk.Chart.xucChartRate();
                    this.xucChartRate.Dock = DockStyle.Fill;
                    this.tabChartRate.Controls.Add(this.xucChartRate);
                }
            }
            else if (e.Page == this.tabChartPosition)
            {
                if (this.xucChartPosition == null)
                {
                    this.xucChartPosition = new HRM.CORE.Workdesk.Chart.xucChartPosition();
                    this.xucChartPosition.Dock = DockStyle.Fill;
                    this.tabChartPosition.Controls.Add(this.xucChartPosition);
                }
            }
            else if (e.Page == this.tabChartEducation)
            {
                if (this.xucChartEducation == null)
                {
                    this.xucChartEducation = new HRM.CORE.Workdesk.Chart.xucChartEducation();
                    this.xucChartEducation.Dock = DockStyle.Fill;
                    this.tabChartEducation.Controls.Add(this.xucChartEducation);
                }
            }
            else if (e.Page == this.tabChartLanguage)
            {
                if (this.xucChartLanguage == null)
                {
                    this.xucChartLanguage = new HRM.CORE.Workdesk.Chart.xucChartLanguage();
                    this.xucChartLanguage.Dock = DockStyle.Fill;
                    this.tabChartLanguage.Controls.Add(this.xucChartLanguage);
                }
            }
            else if (e.Page == this.tabChartInformatic)
            {
                if (this.xucChartInformatic == null)
                {
                    this.xucChartInformatic = new HRM.CORE.Workdesk.Chart.xucChartInformatic();
                    this.xucChartInformatic.Dock = DockStyle.Fill;
                    this.tabChartInformatic.Controls.Add(this.xucChartInformatic);
                }
            }
            else if (e.Page == this.tabChartEthnic)
            {
                if (this.xucChartEthnic == null)
                {
                    this.xucChartEthnic = new HRM.CORE.Workdesk.Chart.xucChartEthnic();
                    this.xucChartEthnic.Dock = DockStyle.Fill;
                    this.tabChartEthnic.Controls.Add(this.xucChartEthnic);
                }
            }
            else if (e.Page == this.tabChartReligion)
            {
                if (this.xucChartReligion == null)
                {
                    this.xucChartReligion = new HRM.CORE.Workdesk.Chart.xucChartReligion();
                    this.xucChartReligion.Dock = DockStyle.Fill;
                    this.tabChartReligion.Controls.Add(this.xucChartReligion);
                }
            }
            else if (e.Page == this.tabChartNationality)
            {
                if (this.xucChartNationality == null)
                {
                    this.xucChartNationality = new HRM.CORE.Workdesk.Chart.xucChartNationality();
                    this.xucChartNationality.Dock = DockStyle.Fill;
                    this.tabChartNationality.Controls.Add(this.xucChartNationality);
                }
            }
            else if (e.Page == this.tabChartMarriage)
            {
                if (this.xucChartMarriage == null)
                {
                    this.xucChartMarriage = new HRM.CORE.Workdesk.Chart.xucChartMarriage();
                    this.xucChartMarriage.Dock = DockStyle.Fill;
                    this.tabChartMarriage.Controls.Add(this.xucChartMarriage);
                }
            }
            else if (e.Page == this.tabChartStatus)
            {
                if (this.xucChartStatus == null)
                {
                    this.xucChartStatus = new HRM.CORE.Workdesk.Chart.xucChartStatus();
                    this.xucChartStatus.Dock = DockStyle.Fill;
                    this.tabChartStatus.Controls.Add(this.xucChartStatus);
                }
            }
            else if ((e.Page == this.tabChartProfessional) && (this.xucChartProfessional == null))
            {
                this.xucChartProfessional = new HRM.CORE.Workdesk.Chart.xucChartProfessional();
                this.xucChartProfessional.Dock = DockStyle.Fill;
                this.tabChartProfessional.Controls.Add(this.xucChartProfessional);
            }
        }
    }
}

